package com.suneee.role.entity;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.List;

import com.suneee.orm.annotation.Column;
import com.suneee.orm.annotation.Entity;
import com.suneee.orm.annotation.GeneratedValue;
import com.suneee.orm.annotation.GenerationType;
import com.suneee.orm.annotation.Id;
import com.suneee.orm.annotation.Table;
import com.suneee.orm.annotation.Transient;
import com.suneee.permission.entity.Permission;

@Entity
@Table(name = "t_role")
public class Role implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1838443360753694134L;
	
	/**
	 * 唯一id
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="role_id",nullable=false)
	private Integer roleId;
	
	/**
	 * 企业编号
	 */
	@Column(name="enterprise_code",nullable=false)
	private String enterpriseCode;
	
	/**
	 * 名称
	 */
	@Column(name="name",nullable=false)
	private String name;
	
	/**
	 * 编号
	 */
	@Column(name="code")
	private String code;
	
	/**
	 * 是否可用
	 */
	@Column(name="enabled",nullable=false)
	private Boolean enabled;
	
	/**
	 * 创建时间
	 */
	@Column(name="create_time",nullable=false)
	private Timestamp createTime;
	/**
	 * 修改时间
	 */
	@Column(name="last_update_time",nullable=false)
	private Timestamp lastUpdateTime;
	
	@Transient
	private List<Permission> permissionList;
	
	
	public Integer getRoleId() {
		return roleId;
	}
	public void setRoleId(Integer roleId) {
		this.roleId = roleId;
	}
	public String getEnterpriseCode() {
		return enterpriseCode;
	}
	public void setEnterpriseCode(String enterpriseCode) {
		this.enterpriseCode = enterpriseCode;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public Boolean getEnabled() {
		return enabled;
	}
	public void setEnabled(Boolean enabled) {
		this.enabled = enabled;
	}
	public List<Permission> getPermissionList() {
		return permissionList;
	}
	public void setPermissionList(List<Permission> permissionList) {
		this.permissionList = permissionList;
	}
	public Timestamp getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}
	public Timestamp getLastUpdateTime() {
		return lastUpdateTime;
	}
	public void setLastUpdateTime(Timestamp lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}
	
}
